home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2382 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: ts3-029.jaxnet.com!user
  2. From: garyg@jax.jaxnet.com (Gary M. Greenberg)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: iHelp!  Dumb question for smart THINK C users.
  5. Date: Sat, 20 Jan 1996 18:23:27 -0500
  6. Organization: Southeast Network Services, Inc.
  7. Message-ID: <garyg-2001961823270001@ts3-029.jaxnet.com>
  8. References: <stlabguest-2001961601280001@pm71001.scilab.wesleyan.edu>
  9. NNTP-Posting-Host: ts3-029.jaxnet.com
  10.  
  11. In article <stlabguest-2001961601280001@pm71001.scilab.wesleyan.edu>,
  12. stlabguest@wesleyan.edu (STLab Public Access Macintosh) wrote:
  13.  
  14. >  I'm a total newbie to C programming, but I got a copy of THINK C yesterday
  15. >  and decided to try to learn.  So I tried a very simple program:
  16. >  
  17. >  #include <STDIO.h>
  18.  
  19. Try this ->> <stdio.h>
  20.  
  21. >  main()
  22.  
  23. surely you meant "int main ()"
  24.  
  25. >  {
  26. >     printf(  "bla" );
  27.  
  28. here, you forgot "return 0;"
  29.  
  30. >  }
  31.  
  32. Other than that, it's a nice first program ;-)
  33.  
  34. >  It compiled without any errors, but when I tried to run it, it said that
  35. >  there was a link error: it didn't know what "prinf" meant.  I'm sure that
  36. >  it was loading the "STDIO.h" properly, because I changed the program to:
  37.  
  38. how sure???
  39.  
  40. good luck.
  41.  
  42. btw, buy The C Programming Language by Kernighan & Ritchie, Second Edition
  43. and read it. Grab a copy of the c.l.c FAQ when it's posted, or slide on
  44. over to M.I.T. and grab a copy, and read that too.
  45. These two tools will make your programming days easier, more productive,
  46. and they'll help keep the c.l.c. signal-to-noise ratio within reason.
  47.     <ever the eternal optomist> ;-)
  48. cheers,
  49.  
  50. gary    /* the Sorcerer's Apprentice */
  51.  
  52. "Why do we have to hide from the police, Daddy?"
  53. "Because we use vi, honey. They use emacs."
  54. "Unless we're on a Mac, then we use BBEdit 'cause `It Doesn't Suck!'"
  55.